package com.sx.zongzhi.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.sx.zongzhi.R;
import com.sx.zongzhi.activity.AppealActivity;
import com.sx.zongzhi.activity.DisputePendingActivity;
import com.sx.zongzhi.activity.InBoxActivity;
import com.sx.zongzhi.activity.KeyAreaActivity;
import com.sx.zongzhi.activity.KeyPunishActivity;
import com.sx.zongzhi.activity.KeyTradesActivity;
import com.sx.zongzhi.activity.SendBoxActivity;
import com.sx.zongzhi.activity.ServiceRecordActivity;
import com.sx.zongzhi.activity.WorkLogActivity;

import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by XZY on 2017/11/21.
 * 办公
 */
public class WorkFragment extends Fragment {

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_work,container,false);
        ButterKnife.bind(this,view);
        return view;
    }


    @OnClick({R.id.tv_WorkLog,R.id.tv_ServiceRecord,R.id.tv_InBox,R.id.tv_SendBox,R.id.tv_Dispute,
            R.id.tv_Appeal,R.id.tv_KeyPunish,R.id.tv_KeyArea,R.id.tv_KeyTrades})
    public void OnClick(View view) {
        switch (view.getId()) {
            case R.id.tv_WorkLog://工作日志
                startActivity(new Intent(getActivity(), WorkLogActivity.class));
                break;
            case R.id.tv_ServiceRecord://服务记录
                startActivity(new Intent(getActivity(), ServiceRecordActivity.class));
                break;
            case R.id.tv_InBox://收件箱
                startActivity(new Intent(getActivity(), InBoxActivity.class));
                break;
            case R.id.tv_SendBox://发件箱
                startActivity(new Intent(getActivity(), SendBoxActivity.class));
                break;
            case R.id.tv_Dispute://矛盾纠纷
                startActivity(new Intent(getActivity(), DisputePendingActivity.class)
                .putExtra("DEAL_TYPE","矛盾纠纷-待办"));
                break;
            case R.id.tv_Appeal://诉求服务
                startActivity(new Intent(getActivity(), AppealActivity.class));
                break;
            case R.id.tv_KeyPunish://重点地整治
                startActivity(new Intent(getActivity(), KeyPunishActivity.class));
                break;
            case R.id.tv_KeyArea://重点区域
                startActivity(new Intent(getActivity(), KeyAreaActivity.class));
                break;
            case R.id.tv_KeyTrades://重点行业
                startActivity(new Intent(getActivity(), KeyTradesActivity.class));
                break;
        }
    }
}
